// cx_code.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <cassert>
#include "googletest-1.16.0/include/gtest/gtest.h"

#include "cx_string/tests/cx_string_tests.cpp"             // should include this file otherwise unit test won't run
#include "cx_string/tests/cx_string_to_array_tests.cpp"    // should include this file otherwise unit test won't run
#include "windows/security/tests/cx_temp_tests.cpp"        // should include this file otherwise unit test won't run
#include "windows/security/tests/cx_sddl_tests.cpp"

int main(int argc, char** argv)
{
    {
        auto r = cxStrWideToUtf8(L"你好");
        std::cout << __cplusplus << std::endl;

#if __cplusplus >= 202002L
        assert(r == std::string(reinterpret_cast<const char*>(u8"你好")));
#else
        assert(r == u8"你好");
#endif
    }
    std::cout << "begin init google test" << std::endl;

    ::testing::InitGoogleTest(&argc, argv);
    auto r =  RUN_ALL_TESTS();

    system("pause");

    return r;
}
